/**
 * @(#) handHBox.as
 *
 * @date		2010. 11. 01
 * @version		2.0
 * @author		Shin, Yunwoo
 * @client		Service Ace 
 * @module		Compensation  (급여)
 * @description	handMouse를 위한   - Itemrenderer
 * 				
 */
package com.skt.common_hr.compensation.view.components
{
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	import mx.containers.HBox;
	import mx.controls.Label;
	import mx.controls.advancedDataGridClasses.AdvancedDataGridListData;
	import mx.controls.listClasses.BaseListData;
	import mx.controls.listClasses.IDropInListItemRenderer;
	
	
	public class handHBox extends HBox implements IDropInListItemRenderer
	{
		public function handHBox(){
			super(); 
			this.setStyle("verticalAlign","middle");
			this.setStyle("backgroundColor","#ffffff");
			//this.alpha = 0;
			this.percentHeight = 100;
			this.buttonMode = true;
			this.mouseChildren = false;
			this.useHandCursor = true;
			this.horizontalScrollPolicy = "off";
		}
		
		private var _listData:AdvancedDataGridListData;
		private var lb:Label;
		public function get listData():BaseListData
		{
		  	return _listData;
		}
		public function set listData(value:BaseListData):void
		{
			_listData = AdvancedDataGridListData(value);
		}
		
		override protected function createChildren():void
		{
			super.createChildren();
			lb = new Label();
			lb.percentWidth = 100;
			this.addChild(lb);
		}
		
		override public function set data(value:Object):void{
			super.data = value;
			if(value != null) lb.text = value[_listData.dataField];
			super.invalidateDisplayList();					
		}
	}
}